﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using C1.Win.C1Preview;

namespace PCSTestReport
{
    public partial class ViewReportForm : Form
    {
        public ViewReportForm()
        {
            InitializeComponent();
        }

        private void ViewReportButton_Click(object sender, EventArgs e)
        {
            TienDoSanXuatMaHang.TienDoSanXuatMaHang report = new TienDoSanXuatMaHang.TienDoSanXuatMaHang();
            report.PCSConnectionString = "Provider=SQLOLEDB;Data Source=.;User ID=sa;Password=episerver;Initial Catalog=VBC";
            report.ReportDefinitionFolder = @"C:\Projects\VBC\@Output\Debug\ReportDefinition";
            report.ReportLayoutFile = "TienDoSanXuatMaHang.xml";
            var result = report.ExecuteReport("4623");
            dataGridView1.DataSource = result;
        }
    }
}
